import request from '@/utils/request'

// 查询民宿信息列表
export function listAccommodation(query) {
  return request({
    url: '/system/accommodation/list',
    method: 'get',
    params: query
  })
}

// 查询民宿信息详细
export function getAccommodation(id) {
  return request({
    url: '/system/accommodation/' + id,
    method: 'get'
  })
}

// 新增民宿信息
export function addAccommodation(data) {
  return request({
    url: '/system/accommodation',
    method: 'post',
    data: data
  })
}

// 修改民宿信息
export function updateAccommodation(data) {
  return request({
    url: '/system/accommodation',
    method: 'put',
    data: data
  })
}

// 删除民宿信息
export function delAccommodation(id) {
  return request({
    url: '/system/accommodation/' + id,
    method: 'delete'
  })
}

// 导出民宿信息
export function exportAccommodation(query) {
  return request({
    url: '/system/accommodation/export',
    method: 'get',
    params: query
  })
}